const getURLvar = (key, default=null) => {
    const query = location.search.slice(1).split('&').map(v => v.split('=')).reduce((p,n) => { return {...p,[n[0]]:n[1]} },{});
    return query[key] || default;
}